let textStyle= {color: "#b3babe"};
let legend={
	type: "plain",
	top: 10,
	left: "2%",
	textStyle: {
		fontSize: 12
	},
	data: [{
		name: '',
		icon: 'none',
		textStyle: {
			color: "#fff"
		}
	}]
}	

let grid={
	left: 15,
	bottom: 10,
	top: 50,
	right: 15,
	containLabel: true	
};
let xAxis={
	type: 'category',
	boundaryGap: true,
	axisLabel: {
		fontSize: 12,
		color: '#fff'
	},
	axisLine: {
		lineStyle: {
			type: 'dashed',
			color: '#79a5a5',
		}
	},
	splitLine: {
		show: true,
		lineStyle: {
			color: '#79a5a5',
			type: 'dashed'
		}
	},
	data: []
};
let	yAxis={
		axisLine: {
			lineStyle: {
				type: 'dashed',
				color: '#79a5a5',
			}
		},
		axisLabel: {
			fontSize: 12,
			color: '#fff'
		},
		splitLine: {
			show: true,
			lineStyle: {
				color: '#79a5a5',
				type: 'dashed'
			}
		}
};



let serives=[{
		name: '温度',
		type: 'line',
		showAllSymbol: true,
		symbol: 'circle',
		smooth: true,
		symbolSize: 10,
		lineStyle: {
			normal: {
				color: "#48B3FF"
			},
		},
		label: {
			show: false,
			position: 'top',
			textStyle: {
				color: '#48B3FF',
			}
		},
		itemStyle: {
			color: "#FFF",
			borderColor: "rgba(14, 156, 255, 1)",
			borderWidth: 3,

		},
		tooltip: {
			show: true
		},
		areaStyle: {
			normal: {
				color:'rgba(14, 156, 255, .5)',
			}
		},
		data: [],
}]

export const templateOption = {
	textStyle: textStyle,
	legend: legend,
	grid: grid,
	xAxis:xAxis,
	yAxis: yAxis,
	series: serives
}



// 深度克隆
export const deepCopy=(obj)=>{
  if (typeof obj === 'object') {
    var result = obj.constructor === Array ? [] : {};    
    for (var i in obj) {
      result[i] = typeof obj[i] === 'object' ? deepCopy(obj[i]) : obj[i];
    }
  } else {
    var result = obj;
  }
  
  return result;	
}
